<div class="navButtonsTop rounded-corners">
	<h1 class="title"><g:message code="title.page.show" args="[pageInstance.title]"/></h1>
</div>

<div class="element">
	<div class="image">
		<img src="${resource(file:pageInstance?.pathFileThumbnail)}"/>
	</div>
	
	<div class="tableCreate">
	    <table>
	        <tbody>
	        	<usr:isAdmin>
		            <tr>
		                <td class="name"><g:message code="default.label.id"/>:</td>
		                <td class="value">${fieldValue(bean: pageInstance, field: "id")}</td>
		            </tr>
		            <tr>
		                <td class="name"><g:message code="default.label.disabled"/>:</td>
		                <td class="value"><g:formatBoolean boolean="${pageInstance?.disabled}" /></td>
		            </tr>
		            <tr>
		                <td class="name"><g:message code="default.label.dateCreated"/>:</td>
		                <td class="value"><g:formatDate format="dd-MM-yyyy" date="${pageInstance?.dateCreated}" /></td>
		            </tr>
		            <tr>
			            <td class="name"><g:message code="default.label.lastUpdated"/>:</td>
			            <td class="value"><g:formatDate format="dd-MM-yyyy" date="${pageInstance?.lastUpdated}" /></td>
			        </tr>
			        <tr>
			            <td class="name"><g:message code="default.label.moderationRequest"/>:</td>
			            <td class="value"><g:checkBox name="moderationRequest" value="${pageInstance?.moderationRequest}" DISABLED="true"/></td>
			        </tr>
	            </usr:isAdmin>
	            <tr>
	                <td class="name"><g:message code="default.label.title"/>:</td>
	                <td class="value">${fieldValue(bean: pageInstance, field: "title")}</td>
	            </tr>
	            <tr>
	                <td class="name"><g:message code="default.label.description"/>:</td>
	                <td class="value">${pageInstance.description}</td>
	            </tr>
	            <tr>
	                <td class="name"><g:message code="default.label.numberPage"/>:</td>
	                <td class="value">${fieldValue(bean: pageInstance, field: "numberPage")}</td>
	            </tr>
	            <tr>
	                <td class="name"><g:message code="default.label.comic"/>:</td>
	                <td class="value"><g:link controller="comic" action="show" id="${pageInstance?.comic?.id}">${pageInstance?.comic?.title}</g:link></td>
	            </tr>
	            <usr:isUser>
		            <tr>
		                <td class="name"><g:message code="default.label.createdBy"/>:</td>
		                <td class="value"><g:link controller="user" action="show" id="${pageInstance?.createdBy?.id}">${pageInstance?.createdBy?.alias}</g:link></td>
		            </tr>
		            </tr>
			             <tr>
			            <td class="name"><g:message code="default.label.commentable"/>:</td>
			            <td class="value"><g:formatBoolean boolean="${pageInstance?.commentable}"/></td>
			        </tr>
			        <tr>
			            <td class="name"><g:message code="default.label.rateable"/>:</td>
			            <td class="value"><g:formatBoolean boolean="${pageInstance?.rateable}" /></td>
			        </tr>
	            </usr:isUser>
	        </tbody>
	    </table>
	</div>
	<div class="rating">
		<g:if test="${pageInstance.rateable}">
			<div id="average-rating">
				<label><g:message code="default.label.rating" />:</label> <g:render template="/rate/rate" model="[instance:pageInstance]"/>
			</div>
			<usr:itsNotMine target="${pageInstance.createdBy.id}">
				<div id="your-rating">
					<label><g:message code="default.label.rate.yours" />:</label> <g:render template="/rate/rateCustom" model="[instance:pageInstance]"/>
				</div>
			</usr:itsNotMine>
		</g:if>
	</div>
</div>

<div class="navButtons rounded-corners">
	<g:render template="/page/buttons"></g:render>
</div>